<?php

/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2022/1/28 10:15
 * Desc: 门票订单工厂
 */
class Entities_Provider_Ticket_Order_Factory
{
    private static $ticketOrderObj = null;

    private function __construct()
    {
    }

    public static function getInstance($channel)
    {
        $channel = strtolower($channel);
        if (self::$ticketOrderObj == null) {
            switch ($channel) {
                case 'tcticket': // 同程票务
                    self::$ticketOrderObj = new Model_Tcticket_Order();
                    break;
                case 'zwyticket': // 自我游票务
                    self::$ticketOrderObj = new Model_Zwyticket_Order();
                    break;
            }
        }
        return self::$ticketOrderObj;
    }
}